<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8" />
        <title>{$MenuTitle}-{eyou:global name='web_name' /}</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
        <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        {eyou:static file="users/skin/css/bootstrap.min.css"/}
        {eyou:static file="users/skin/css/basic.css"/}
        {eyou:static file="users/skin/css/eyoucms.css"/}
        {eyou:static file="users/skin/css/shop.css"/}
        {eyou:static file="users/skin/css/tb_style.css"/}
        <!-- 新样式 2020-11-25 -->
        {eyou:static file="users/skin/css/element/index.css" /}
        {eyou:static file="users/skin/css/e-user.css" /}
        {eyou:include file="users/skin/css/diy_css.htm"/}

        {eyou:static file="/public/static/common/js/jquery.min.js"/}
        {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
        {eyou:static file="/public/static/common/js/tag_global.js"/}
    </head>

    <body>

        {eyou:include file="users/users_header.htm" /}
        <!-- 头部信息 -->
        <div class="ey-header-status">
            <div class="header-status-l">
                <a href="javascript:history.go(-1)"><i class="el-icon-arrow-left"></i></a>
            </div>
            <div class="header-status-m">{$MenuTitle}</div>
            <div class="header-status-r">
                <a href="{eyou:url link='user/Users/index' /}"><i class="el-icon-user"></i></a>
            </div>
        </div>
        <!-- 头部信息结束 -->
        <div class="h50"></div>
                    
        <div class="ey-container">
            <div class="ey-con">
                <div class="ey-row">
                    <!-- 中部 -->
                    <div style="overflow-x: scroll;padding: 4px 0;" id="finance-list_wrapper" class="el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition">
                        <table style="width:100%;">
                            <tbody>
                                {empty name="$eyou.field.data"}
                                <tr>
                                    <td valign="top" colspan="50">
                                        <div class="cell pt50 pb50 tc">
                                           <span class="mb10"><img id='litpic_img'  src="__PUBLIC__/static/common/images/null-data.png"/></span>
                                         </div>
                                    </td>
                                </tr>
                                {else/}
                                {eyou:volist name="$eyou.field.data" id="vo"}
                                <tr>
                                    <td style="width: 5%;">
                                        <div class="list_z">
                                            <label class="checkbox-label release-checkbox checkbox_z">
                                                <span> &nbsp; </span>
                                                <input class="checkbox" type="checkbox" name="aids[]" value="{$vo.aid}">
                                                <span class="check-mark"></span>
                                            </label>
                                        </div>
                                    </td>
                                    <td style="width: 20%;">
                                        <a  href="{$vo.arcurl}">
                                            <div class="list_z">
                                                {eyou:empty name='$vo.litpic' /}
                                                <img class="pic" src="__PUBLIC__/static/common/images/not_adv.jpg"> 
                                                {eyou:else /}
                                                <img class="pic" src="{$vo.litpic}">
                                                {/eyou:empty}
                                            </div>
                                        </a>
                                    </td>
                                    <td style="width: 70%;">
                                         <a  href="{$vo.arcurl}">
                                            <div class="list_z">
                                               {$vo.title}
                                            </div>
                                            <div class="list_z"><span class="e_ty">{$vo.typename}</span><span class="e_ty">{$vo.add_time|date='Y-m-d H:i:s',###}</span></div>
                                            <div class="list_z"><span class="re_ed">{$home_article_arcrank[$vo['arcrank']]|default=''}</span></div>
                                         </a>
                                    </td>
                                
                                    
                                
                                    <td style="width: 5%;">
                                        <div class="list_z">
                                            <a href="javascript:void(0);" class="el-button el-button--small delete"
                                                data-editurl="{$vo.editurl}" onclick="EditData(this);"><i class="el-icon-edit-outline"></i></a>
                                            <a href="javascript:void(0);" class="el-button  el-button--small delete"
                                                data-id="{$vo.aid}" data-url="{$eyou.field.delurl}" onclick="DelData(this);"><i class="el-icon-delete"></i></a>
                                        </div>
                                    </td>
                                </tr>
                                {/eyou:volist}
                                {/empty}
                                <tr>
                                    <td class="border-b-n" style="width: 5%;">
                                        <div class="list_z">
                                            <label class="checkbox-label release-checkbox checkbox_z">
                                                <span> &nbsp; </span>
                                                <input class="checkbox" type="checkbox" onclick="javascript:$('input[name*=aids]').prop('checked',this.checked);">
                                                <span class="check-mark"></span>
                                            </label>
                                        </div>
                                    </td>
                                    <td class="border-b-n" style="width: 20%;">
                                        <div class="list_z">
                                            <a class="el-button el-button--primary is-plain el-button--small" href="javascript:void(0);"
                                                onclick="BatchDelData(this, 'aids');" data-url="{$eyou.field.delurl}">批量删除</a>
                                        </div>
                                    </td>
                                    <td class="border-b-n" style="width: 70%;"></td>
                                    <td class="border-b-n" style="width: 5%;">
                                        <div class="list_z">
                                           {eyou:include file="users/release_bar.htm" /}
                                        </div>
                                    </td>
                                    
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div style="text-align: center;">{$page}</div>
                    <!-- END -->
                </div>
            </div>
        </div>
        <script type="text/javascript">
            // 内容查看
            function ArcUrl(obj) {
                window.open($(obj).attr('data-arurl'));
            }
            // 编辑内容
            function EditData(obj) {
                window.location.href = $(obj).attr('data-editurl');
            }
            // 单个删除发布的内容
            function DelData(obj) {
                layer.confirm('是否删除该投稿？', {
                    title: false,
                    btn: ['是', '否'] //按钮
                }, function() {
                    layer_loading('正在处理');
                    // 确定
                    $.ajax({
                        type: "POST",
                        url: $(obj).attr('data-url'),
                        data: {
                            del_id: $(obj).attr('data-id')
                        },
                        dataType: 'json',
                        success: function(res) {
                            layer.closeAll();
                            if (res.code == 1) {
                                layer.msg(res.msg, {
                                    icon: 1
                                });
                                window.location.reload();
                            } else {
                                showErrorAlert(res.msg);
                            }
                        },
                        error: function(e) {
                            layer.closeAll();
                            showErrorAlert(e.responseText);
                        }
                    });
                }, function(index) {
                    layer.close(index);
                });
            }
            // 批量删除发布的内容
            function BatchDelData(obj, name) {
                var a = [];
                $('input[name^=' + name + ']').each(function(i, o) {
                    if ($(o).is(':checked')) {
                        a.push($(o).val());
                    }
                })
                if (a.length == 0) {
                    showErrorAlert('请至少选择一项！');
                    return;
                }
                // 删除按钮
                layer.confirm('确认批量彻底删除？', {
                    title: false,
                    closeBtn: false,
                    btn: ['确定', '取消'] //按钮
                }, function() {
                    layer_loading('正在处理');
                    $.ajax({
                        type: "POST",
                        url: $(obj).attr('data-url'),
                        data: {
                            del_id: a
                        },
                        dataType: 'json',
                        success: function(res) {
                            layer.closeAll();
                            if (res.code == 1) {
                                layer.msg(res.msg, {
                                    icon: 1
                                });
                                window.location.reload();
                            } else {
                                showErrorAlert(res.msg);
                            }
                        },
                        error: function(e) {
                            layer.closeAll();
                            showErrorAlert(e.responseText);
                        }
                    });
                }, function(index) {
                    layer.closeAll(index);
                });
            }
        </script>
        <!-- END -->
